<%@ page language="java" import="java.util.*, java.text.*,com.zjut.zs.util.tools.*,com.zjut.an.util.tools.*,com.zjut.an.util.system.*,
com.zjut.zs.user.manager.*, com.zjut.zs.user.dao.*,com.zjut.zs.exvalue.manager.*, com.zjut.zs.exvalue.dao.*,com.zjut.zs.coname.manager.*, 
com.zjut.zs.userstatus.manager.*, com.zjut.zs.userstatus.dao.*,com.zjut.an.config.manager.*, com.zjut.an.config.dao.*,
com.zjut.zs.school.manager.*, com.zjut.zs.school.dao.*,com.zjut.zs.coname.dao.*" pageEncoding="utf-8"%>
<!DOCTYPE html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">  
<meta name="renderer" content="webkit"> 
<title>无标题文档</title>
<link href="css/style.css" rel="stylesheet" type="text/css" />
<script src='../plugins/assets/plugins/jquery-3.5.1.min.js'></script>
</head>

<body>
<jsp:include page="zs_uservalidate.jsp" flush="true"/>
<%
if (session.getAttribute("zsUser") == null&&session.getAttribute("admin") == null&&session.getAttribute("user") == null) {
	out.print("<script>alert('由于长时间未操作，系统已经自动注销，请重新登陆');</script>");
	out.print("<script>top.window.location='main.jsp';</script>");
} else {

AnConfigManager anconfig = (AnConfigManager) SpringContextUtil.getBean("AnConfigManager");
ZsSchoolManager zsManager = (ZsSchoolManager) SpringContextUtil.getBean("ZsSchoolManager");
ZsCoNameManager comanager = (ZsCoNameManager) SpringContextUtil.getBean("ZsCoNameManager");
ZsHTMLCreat html = (ZsHTMLCreat) SpringContextUtil.getBean("ZsHTMLCreat");
ZsExValueManager emanager = (ZsExValueManager) SpringContextUtil.getBean("ZsExValueManager");
ZsUserManager umanager = (ZsUserManager) SpringContextUtil.getBean("ZsUserManager");
ZsUserStatusManager smanager = (ZsUserStatusManager) SpringContextUtil.getBean("ZsUserStatusManager");
ZsExValue exv = new ZsExValue();
ZsUser user = null;
if(session.getAttribute("admin")!=null && request.getParameter("usId")!=null) {
	String usId = request.getParameter("usId");
	user = umanager.getData(usId);
} else if (session.getAttribute("zsUser")!=null) {
	user = (ZsUser)session.getAttribute("zsUser");	
} 		
if (user!=null) {
	exv.setZsUser(user);										
	List list = emanager.getDataByInstance(1,1,null,null,exv).getObjects();
	if (list.size()>0) {
		exv = (ZsExValue)list.get(0);
	}
}
ZsSchool school = new ZsSchool();
school = (ZsSchool)zsManager.getDataByInstance(1,1,null,null,school).getObjects().get(0);
ZsUserStatus userStatus = smanager.getDataByUser(user);
 %>
	<div class="place">
    <span>位置：</span>
    <ul class="placeul">
    <li><a href="index.jsp">首页</a></li>
    <li><a href="#">报考信息填写</a></li>
    </ul>
    </div>
    
    <div class="formbody">
    
    <div class="formtitle"><span>报考信息填写</span></div>
    <form id="ff" name="add" role="form" class="form-horizontal" action="" method="post">  
	    <ul class="forminfo">
	    
	    <li><label>报考条件</label>
	    <select name="column1" id="column1" class="dfinput" required>
          <option value="报名条件一（1）类" <%if("报名条件一（1）类".equals(exv.getColumn1()))out.print("selected"); %>>报名条件一（1）类</option>
          <option value="报名条件一（2）类" <%if("报名条件一（2）类".equals(exv.getColumn1()))out.print("selected"); %>>报名条件一（2）类</option>
          <option value="报名条件二类" <%if("报名条件二类".equals(exv.getColumn1()))out.print("selected"); %>>报名条件二类</option>
        </select></li>
        
	    <li><label>报考组别</label>
	    <select name="column2" id="column2" onChange="redirec(document.add.column2.options.selectedIndex)" class="dfinput" required>
          <option value="A组" <%if("A组".equals(exv.getColumn2()))out.print("selected"); %>>A组</option>
          <option value="B组" <%if("B组".equals(exv.getColumn2()))out.print("selected"); %>>B组</option>
          <option value="C组" <%if("C组".equals(exv.getColumn2()))out.print("selected"); %>>C组</option>
          <option value="D组" <%if("D组".equals(exv.getColumn2()))out.print("selected"); %>>D组</option>
          <option value="E组" <%if("E组".equals(exv.getColumn2()))out.print("selected"); %>>E组</option>
          <option value="F组" <%if("F组".equals(exv.getColumn2()))out.print("selected"); %>>F组</option>
        </select></li>
                      
        <li><label>专业(类)名称1</label>
        <select name="column3" id="column3" class="dfinput" required> 
        <option value="<%=html.getInputString(exv.getColumn3()) %>" ><%=html.getInputString(exv.getColumn3()) %></option>
        </select></li>
        
	    <li><label>专业(类)名称2</label>
        <select name="column4" id="column4" class="dfinput" > 
        <option value="<%=html.getInputString(exv.getColumn4()) %>" ><%=html.getInputString(exv.getColumn4()) %></option>
        </select></li>
        
	    <li><label>专业(类)名称3</label>
        <select name="column5" id="column5" class="dfinput" > 
        <option value="<%=html.getInputString(exv.getColumn5()) %>" ><%=html.getInputString(exv.getColumn5()) %></option>
        </select></li>
        
	    <li><label>专业(类)名称4</label>
        <select name="column6" id="column6" class="dfinput" > 
        <option value="<%=html.getInputString(exv.getColumn6()) %>" ><%=html.getInputString(exv.getColumn6()) %></option>
        </select></li>
        
	    <li><label>专业(类)名称5</label>
        <select name="column7" id="column7" class="dfinput" > 
        <option value="<%=html.getInputString(exv.getColumn7()) %>" ><%=html.getInputString(exv.getColumn7()) %></option>
        </select></li>
        
	    <li><label>专业(类)名称6</label>
        <select name="column8" id="column8" class="dfinput" > 
        <option value="<%=html.getInputString(exv.getColumn8()) %>" ><%=html.getInputString(exv.getColumn8()) %></option>
        </select></li>

	    
	    <li><label>&nbsp;</label>
	    <input id="exvId" name="exvId" type="text" class="dfinput" value="<%if(null==exv.getExvId()){out.print("");}else{out.print(exv.getExvId());}; %>"  style="display:none;"/>
	    <input id="scCode" name="scCode" type="text" class="dfinput" value="<%=school.getScCode()%>"  style="display:none;"/>
		<input id="zsUser.usId" name="zsUser.usId" type="text" class="dfinput" value="<%=exv.getZsUser().getUsId() %>"  style="display:none;"/>
		
		<%
		if(Status.SENDSTATUS_NULL.getStatus().equals(userStatus.getSendStatus()) || Status.SENDSTATUS_NO.getStatus().equals(userStatus.getSendStatus()) || session.getAttribute("admin")!=null){ %>
		<button type="submit" class="btn btn-primary btn-sm">保存</button>
		<%} else {%>
		<button type="submit" class="btndisable" disabled>已确认</button>
		<%} %>
	    </ul>
    </form>
    
    </div>
    
    
<div style="margin:50px;"><%out.print(anconfig.getSingleConfigInfoByName("报考信息填写需知")); %></div>
    
    
<script src="../plugins/assets/plugins/jquery-validation-1.14.0/dist/jquery.validate.js" type="text/javascript"></script>
<script src="../plugins/assets/plugins/jquery-validation-1.14.0/dist/jquery.metadata.js" type="text/javascript"></script>
<script src="js/formvalidate.js" type="text/javascript"></script>
<script src="../admin/js/publicManager.js" type="text/javascript" charset="utf-8"></script> 
<script type="text/javascript">
var updateOneAction = '../zsExValueSave.action?randnum='+Math.floor(Math.random()*1000000);
var loactionurl = 'zs_exvalue_zjut.jsp';
		$(function(){
		
		    //jquery.validate
			$("#ff").validate({
				submitHandler: function() {
					//验证通过后 的js代码写在这里
					submitFormAdvance();
				}
			})				
		})
</script>
<script> 
//获取一级菜单长度 
var select1_len = document.add.column2.options.length; 
var select2 = new Array(select1_len); 
//把一级菜单都设为数组 
for (i=0; i<select1_len; i++) 
{ select2[i] = new Array();} 
//定义基本选项 


select2[0][0]=new Option("","") 
select2[0][1]=new Option("健行学院实验班（人文社科）") ;

select2[1][0]=new Option("","") 
select2[1][1]=new Option("健行学院实验班（理工）") ;

select2[2][0]=new Option("","") ;
select2[2][1]=new Option("材料类","材料类") ;
select2[2][2]=new Option("化工与制药类（化学工程类）","化工与制药类（化学工程类）") ;
select2[2][3]=new Option("化学工程与工艺（卓越工程师）","化学工程与工艺（卓越工程师）") ;
select2[2][4]=new Option("生物工程类","生物工程类") ;
select2[2][5]=new Option("食品科学与工程类","食品科学与工程类") ;
select2[2][6]=new Option("药学类(“2011计划”创新实验区)","药学类（“2011计划”创新实验区）") ;
select2[2][7]=new Option("环境科学与工程类","环境科学与工程类") ;

select2[3][0]=new Option("","") ;
select2[3][1]=new Option("建筑类","建筑类") ;
select2[3][2]=new Option("应用心理学","应用心理学") ;
select2[3][3]=new Option("法学","法学") ;
select2[3][4]=new Option("新闻传播学类","新闻传播学类") ;
select2[3][5]=new Option("汉语言文学","汉语言文学") ;
select2[3][6]=new Option("金融学","金融学") ;
select2[3][7]=new Option("国际经济与贸易","国际经济与贸易") ;
select2[3][8]=new Option("工商管理类","工商管理类") ;
select2[3][9]=new Option("英语","英语") ;
select2[3][10]=new Option("日语","日语") ;
select2[3][11]=new Option("公共管理类","公共管理类") ;

select2[4][0]=new Option("","") ;
select2[4][1]=new Option("计算机类","计算机类") ;
select2[4][2]=new Option("数据科学与大数据技术","数据科学与大数据技术") ;
select2[4][3]=new Option("物理学类（物理与光电信息类）","物理学类（物理与光电信息类）") ;
select2[4][4]=new Option("数学类","数学类") ;
select2[4][5]=new Option("管理科学与工程类","管理科学与工程类") ;
select2[4][6]=new Option("土木类","土木类") ;

select2[5][0]=new Option("","") ;
select2[5][1]=new Option("机械类","机械类") ;
select2[5][2]=new Option("机械类（卓越工程师）","机械类（卓越工程师）") ;
select2[5][3]=new Option("电气类","电气类") ;
select2[5][4]=new Option("电子信息类","电子信息类") ;
select2[5][5]=new Option("机器人工程","机器人工程") ;
select2[5][6]=new Option("工业设计","工业设计") ;
select2[5][7]=new Option("安全工程","安全工程") ;

function redirec(x,flag) 
{ 
		var c2 = document.add.column3; 
		var c3 = document.add.column4; 
		var c4 = document.add.column5; 
		var c5 = document.add.column6; 
		var c6 = document.add.column7; 
		var c7 = document.add.column8; 
		if(!flag){
			c2.innerHTML=""; 
			c3.innerHTML="";
			c4.innerHTML="";
			c5.innerHTML="";
			c6.innerHTML="";
			c7.innerHTML="";
		}
		for (i=0;i<select2[x].length;i++) 
		{
			 c2.options.add(new Option(select2[x][i].text,select2[x][i].value));
			 c3.options.add(new Option(select2[x][i].text,select2[x][i].value));
			 c4.options.add(new Option(select2[x][i].text,select2[x][i].value));
			 c5.options.add(new Option(select2[x][i].text,select2[x][i].value));
			 c6.options.add(new Option(select2[x][i].text,select2[x][i].value));
			 c7.options.add(new Option(select2[x][i].text,select2[x][i].value));
		} 
}
redirec(document.add.column2.options.selectedIndex,true)
</script>


<script type="text/javascript">
</script> 

<%} %>
</body>

</html>
